Developing A Real Time Motor Model For Hil Testing